package edu.cuit.zhuyimeng.uaa.dal.mapper;

import com.alicp.jetcache.anno.Cached;
import com.github.yulichang.base.MPJBaseMapper;
import edu.cuit.zhuyimeng.uaa.dal.po.UserPO;
import edu.cuit.zhuyimeng.uaa.enums.CacheConstants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
* @author XiaoMo
* @Entity edu.cuit.zhuyimeng.uaa.entity.UserPO
*/
@Mapper
public interface UserMapper extends MPJBaseMapper<UserPO> {

    @Cached(name = CacheConstants.PASSWORD_CACHE,key = "#name")
    String selectPasswordByName(@Param("name") String name);

    @Cached(name = CacheConstants.USERINFO_CACHE,key = "#name")
    UserPO selectUserByName(@Param("name") String name);
}




